const { checkTable } = require('../tools');

// app/model/home.js

module.exports = (app) => {
  const { STRING, INTEGER } = app.Sequelize;
  const name = 'egg_user';

  const User = app.model.define(name, {
    name: STRING(30),
    age: INTEGER,
  });

  checkTable(app, name);

  return User;
};
